package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.Strategy;
import cn.wolfcode.trip.base.query.QueryObject;
import cn.wolfcode.trip.base.query.StrategyQueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface StrategyMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Strategy entity);

    Strategy selectByPrimaryKey(Long id);

    List<Strategy> selectAll();

    int updateByPrimaryKey(Strategy entity);

    List<Strategy> selectForList(QueryObject qo);

    int selectCountByKeyword(StrategyQueryObject qo);
    List<Strategy> selectReviewById(Long id);

    void saveCollectByStrategyId(@Param("userId") Long userId, @Param("strategyId") Long strategyId);

    void deleteCollectByStrategyId(@Param("userId") Long userId, @Param("strategyId") Long strategyId);

    int selectCollectCountByStrategyId(Long strategyId);

    Map selectCollectByStrategyId(@Param("userId") Long userId, @Param("strategyId") Long strategyId);
}